var t = getApp();

Page({
    data: {
        take_sn: "",
        detailInfo: {},
        status: 1
    },
    onLoad: function(t) {
        if (t.take_sn && (this.data.take_sn = t.take_sn), t.scene) {
            var e = decodeURIComponent(t.scene);
            if (console.log(e), e) {
                var n = [];
                n = e.split("&");
                for (var s = 0; s < n.length; s++) {
                    var a;
                    a = n[s].split("="), console.log(a), "take_sn" == a[0] && this.setData({
                        take_sn: a[1]
                    });
                }
            }
        }
        this.getDetails();
    },
    onReady: function() {},
    getDetails: function() {
        var e = this, n = this.data.take_sn, s = t.getNetAddresss("plugin.live-install.frontend.store-order.orderDetail");
        t._postNetWork({
            url: s,
            data: {
                take_sn: n
            },
            success: function(n) {
                var s = n.data;
                if (1 != s.result) return t.tips(s.msg);
                e.setData({
                    detailInfo: s.data
                });
            }
        });
    },
    sendBtn: function() {
        var e = this, n = this.data.detailInfo.order_id, s = t.getNetAddresss("plugin.live-install.frontend.store-order.takeOrder");
        t._postNetWork({
            url: s,
            data: {
                order_id: n
            },
            success: function(n) {
                var s = n.data;
                if (1 != s.result) return t.tips(s.msg);
                e.setData({
                    status: 2
                });
            }
        });
    },
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {}
});